package collections;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class collections {
	public static void main(String[] args) {
		List<String> list=new ArrayList<String>();
		list.add("Tom2");
		list.add("Tom1");
		list.add("Tom4");
		list.add("Tom3");
		p(list.toString()+"\n");
		Collections.sort(list);
		p(list.toString()+"\n");
		Collections.reverse(list);
		p(list.toString()+"\n");
		Collections.shuffle(list);
		p(list.toString()+"\n");
	}
	static void p(Object o){
		System.out.print(o);
	}

}
